package test;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import expression.PostfixEvaluator;

public class MattPetroPETest {

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void firstEvalTest() {
		assertEquals(PostfixEvaluator.eval("5 6 * 4 2 * - 3 +"), 25);
	}
	
	@Test
	public void secondEvalTest() {
		assertEquals(PostfixEvaluator.eval("35 7 / 5 * 2 3 8 * - +"), 3);
	}
	
	@Test
	public void thirdEvalTest() {
		assertEquals(PostfixEvaluator.eval("3 6 * 5 * 4 * 10 / 5 + 4 +"), 45);
		
	}
	
	@Test
	public void fourthEvalTest() {
		assertEquals(PostfixEvaluator.eval("2 8 * 2 3 ^ + 10 5 / +"), 26);
		
	}
	
	@Test
	public void fifthEvalTest() {
		assertEquals(PostfixEvaluator.eval("3 6 * 5 * 4 * 10 / 5 + 4 +"), 45);
		
	}

}
